// Copyright 2024, the Chromium project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class PersistentCacheIndexManagerPlatform extends PlatformInterface {
  PersistentCacheIndexManagerPlatform() : super(token: _token);

  static final Object _token = Object();

  /// Throws an [AssertionError] if [instance] does not extend
  /// [PersistentCacheIndexManagerPlatform].
  ///
  /// This is used by the app-facing [PersistentCacheIndexManager] to ensure that
  /// the object in which it's going to delegate calls has been
  /// constructed properly.
  static void verify(PersistentCacheIndexManagerPlatform instance) {
    PlatformInterface.verify(instance, _token);
  }

  /// Enables the SDK to create persistent cache indexes automatically for local query
  /// execution when the SDK believes cache indexes can help improves performance.
  /// This feature is disabled by default.
  Future<void> enableIndexAutoCreation() {
    throw UnimplementedError('enableIndexAutoCreation() is not implemented');
  }

  /// Stops creating persistent cache indexes automatically for local query execution.
  /// The indexes which have been created by calling `enableIndexAutoCreation()` still take effect.
  Future<void> disableIndexAutoCreation() {
    throw UnimplementedError('disableIndexAutoCreation() is not implemented');
  }

  /// Removes all persistent cache indexes. Note this function also deletes indexes
  /// generated by `setIndexConfiguration()`, which is deprecated.
  Future<void> deleteAllIndexes() {
    throw UnimplementedError('deleteAllIndexes() is not implemented');
  }
}
